    <div class="main-content" id="main-content">
            <div class="sub-content">
				<div class="top-header">
					<h1>User Profile</h1>
				</div>
				<div class="top-links">
				
					<ul>
					<?php if(isset($_GET['user']) && $_GET['user']!=''){  ?>
						<li class="active-menu"><a href="/admin/add-user-previous?user=<?php echo $_GET['user'];?>"><span>1</span></a></li>
					<?php }else{ ?>
					<li class="active-menu"><a href="/admin/add-user-previous"><span>1</span></a></li>
					<?php } ?>
						<li><span>2</span></li>
						<li><span>3</span></li>
					</ul>
				</div>
            <div class="middle-forms user-profile1">
					<form id="signupForm" name="signupForm"  method="post">
						<div class="sub-forms">
							<div class="forms-list">
								<label>Company Name</label>
								<input  type="text" id="cname" name="cname" value="<?php if(isset($_SESSION['adminusers']['cname'])){ echo $_SESSION['adminusers']['cname'];} ?>" placeholder="Company Name"> 
							</div><span style="color:red" id="errorcname"></span>
							<div class="forms-list">
								<label>Industry</label>
								<input  type="text" id="industry" name="industry" value="<?php if(isset($_SESSION['adminusers']['industry'])){ echo $_SESSION['adminusers']['industry'];} ?>" placeholder="Industry"> 
							</div><span style="color:red" id="errorindustry"></span>
							<div class="forms-list">
								<label>Address 1</label>
								<textarea  id="address1" name="address1" ><?php if(isset($_SESSION['adminusers']['address1'])){ echo $_SESSION['adminusers']['address1'];} ?></textarea>
							</div><span style="color:red" id="erroraddress1"></span>
						    <div class="forms-list">
								<label>Address 2</label>
								<textarea  id="address2" name="address2" ><?php if(isset($_SESSION['adminusers']['address2'])){ echo $_SESSION['adminusers']['address2'];} ?></textarea>
							</div><span style="color:red" id="erroraddress2"></span>
							<div class="forms-list">
								<label>Address 3</label>
								<textarea  id="address3" name="address3" ><?php if(isset($_SESSION['adminusers']['address3'])){ echo $_SESSION['adminusers']['address3'];} ?></textarea>
							</div><span style="color:red" id="erroraddress3"></span>
							<div class="forms-list">
								<label>Landmark Near By</label>
								<input  type="text" id="lmnear" name="lmnear" value="<?php if(isset($_SESSION['adminusers']['lmnear'])){ echo $_SESSION['adminusers']['lmnear'];} ?>" placeholder="Landmark Near By" />
							</div><span style="color:red" id="errorlmnear"></span>
							<div class="forms-list">
								<label>City</label>
								<input  type="text" id="city" name="city"  value="<?php if(isset($_SESSION['adminusers']['city'])){ echo $_SESSION['adminusers']['city'];} ?>" placeholder="Please enter city"/>
							</div><span style="color:red" id="errorcity"></span>
							<div class="forms-list">
								<label>Country</label>
									<div class="select_6">
										<select id="country" name="country">
											<option value="">-Select a country</option>	
											<?php if(isset($this->countries) && count($this->countries)>0){foreach($this->countries as $countries){ ?>
											<option value="<? echo $countries->country_id;?>" <?php if(isset($_SESSION['adminusers']['country'])){ if($_SESSION['adminusers']['country']==$countries->country_id){ echo 'selected="selected"'; }} ?>><? echo $countries->nicename;?></option>
											<?}}?>
										</select>
									</div>
							</div><span id="errorcountry" style='color:red';></span>
							<div class="forms-list">
								<label>Email</label>
								<input  type="text" id="email" name="email" value="<?php if(isset($_SESSION['adminusers']['email'])){ echo $_SESSION['adminusers']['email'];} ?>" placeholder="Email" />
							</div><span style="color:red" id="erroremail"></span>
							<div class="forms-list">
								<label>Phone </label>
								<input  type="text" id="phone" name="phone" value="<?php if(isset($_SESSION['adminusers']['phone'])){ echo $_SESSION['adminusers']['phone'];} ?>" placeholder="Phone" />
							</div><span style="color:red" id="errorphone"></span>
							<div class="forms-list">
								<label>Fax </label>
								<input  type="text" id="fax" name="fax" value="<?php if(isset($_SESSION['adminusers']['fax'])){ echo $_SESSION['adminusers']['fax'];} ?>" placeholder="Fax" />
							</div><span style="color:red" id="errorfax"></span>
							<?php if(isset($_GET['user']) && $_GET['user']!=''){  ?>
							<input type="hidden" id="user" name="user" value="<?php echo $_GET['user']; ?>">
							<?php } ?>
							<div class="forms-list">
								<button  id="continue" onclick="return validate();">Continue</button>
							</div>
						</div>
					</form>
            </div>
        </div>
    </div>	
<script type="text/javascript">
	function validate(){
	    var flag=true;	
		var filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
		var letters = /^[a-zA-Z ]*$/; 
		var numbers = /^[0-9]+$/;
		var companyname=$('#cname').val();
		var industry=$('#industry').val();
		var address1=$('#address1').val();
		var address2=$('#address2').val();
		var address3=$('#address3').val();
		var landmarknearby=$('#lmnear').val();
		var city=$('#city').val();
		var country=$('#country').val();
		var emailcheck=$('#email').val();
		var pnumber=$('#phone').val();
		var fax=$('#fax').val();
		if(companyname==""){
			$('#errorcname').html('*Please enter company name');	
			flag=false;
		}else if(!companyname.match(letters)){
			$('#errorcname').html('');
			$("#errorcname").html(" Please enter characters only");
			flag=false;
		}else{
			$('#errorcname').html('');
		}
		
		if(industry==""){
			$('#errorindustry').html('*Please enter industry');	
			flag=false;
		}else{
			$('#errorindustry').html('');
		}
		if(address1==""){
			$('#erroraddress1').html('*Please enter address');
			flag=false;
		}else{
			 $('#erroraddress1').html('');
		}
		if(address2==""){
			$('#erroraddress2').html('*Please enter address');
			flag=false;
		}else{
			 $('#erroraddress2').html('');
		}
        if(address3==""){
			$('#erroraddress3').html('*Please enter address');
			flag=false;
		}else{
			 $('#erroraddress3').html('');
		}
		if(landmarknearby==""){
			$('#errorlmnear').html('*Please enter land mark near by');	
			flag=false;
		}else{
			$('#errorlmnear').html('');
		}
		if(city==""){
			$('#errorcity').html('*Please enter city');
			flag=false;
		}else{
			$('#errorcity').html('');
		}
		if(country==""){
			$('#errorcountry').html('*Please enter country');
			flag=false;
		}else{
			$('#errorcountry').html('');
		}
		if(emailcheck==""){
		  $('#erroremail').html('*Please enter email');
		}else if(!filter.test(emailcheck)){
		  $('#erroremail').html('Email format is not correct');
		}else{
		   $('#erroremail').html('');
		}
		if(pnumber==""){
		  $('#errorphone').html('*Please enter phone number');
		  flag=false;
		}else if(!pnumber.match(numbers)){
			$('#errorphone').html(' Plase enter numbers only');
			flag=false;
		}else if(pnumber.length<10 || pnumber.length>10 ){
			$('#errorphone').html('Phone number is invalid');
			flag=false;
		}else{
			$('#errorphone').html('');
		}
		if(fax==""){
			$('#errorfax').html('*Please enter fax');	
			flag=false;
		}else{
			$('#errorfax').html('');
		}
		if(flag==false){ 
			return false;
		}else{		
			$("#signupForm").submit();
		}
	}
</script>

`		

        